package com.ht.bean;

import java.util.List;

public class Pager<T> {

	private int pageNo;

	private int pageSize;

	private int total;

	private List<T> result;

	public Pager() {

	}

	public Pager(int total, List<T> result) {
		this.total = total;
		this.result = result;
	}

	public Pager(int pageNo, int pageSize) {
		this.pageNo = pageNo;
		this.pageSize = pageSize;
	}

	public int getBeginIndex() {
		return (pageNo - 1) * pageSize;
	}
	
	

	public int getPageNo() {
		return pageNo;
	}

	public void setPageNo(int pageNo) {
		this.pageNo = pageNo;
	}

	public int getPageSize() {
		return pageSize;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

	public int getTotal() {
		return total;
	}

	public void setTotal(int total) {
		this.total = total;
	}

	public List<T> getResult() {
		return result;
	}

	public void setResult(List<T> result) {
		this.result = result;
	}

}
